package com.itqhy.service;

import com.itqhy.pojo.Order;
import com.itqhy.pojo.OrderItem;

import java.util.List;

public interface OrderService {
    //保存订单
    public void saveOrder(Order order);
    //将订单id和商品id保存到明细表中
    public void saveOrderIdAndProductId(OrderItem orderItem);
    //统计改用户下订单的个数
    public int countOrderByUserId(int user_id);
    //通过当前用户id查询该用户下的所有订单信息
    public List<Order> findOrderByUserId(int user_id);

   //关联查询
    public Order findProductByOrderId(String order_id);

    //删除订单
    public void deleteOrderById(String order_id);

    //删除订单明细
    public void deleteOrderItemById(String order_id);

}
